import requests
import datetime
import time
import random

if __name__ == '__main__':
	data = [
		(118.853537, 28.967214, 10),
		(118.853537, 28.967214, 10)
	]
	i = 0
	while True:
		time.sleep(random.randint(1, 4))
		location = data[i % 2]
		requests.post('http://127.0.0.1:8888', json={
			'longitude': location[0],
			'latitude': location[1],
			'reader_id': location[2],
			'rfid': 'E280689000000001E86F1280',
			'timestamp': int(time.time())
		})
		i += 1
